<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/
if(file_exists(FCPATH.'gocart/config/database.php'))
{
    $route['default_controller']	= "cart";
}
else
{
    $route['default_controller']   = "install";   
}

//this for the admininstration console
$route['admin']					= 'admin/dashboard';
$route['admin/media/(:any)']	= 'admin/media/$1';

///=========================


define('NEWS_DETAIL','tin-tuc-khuyen-mai/chi-tiet/');
$route[NEWS_DETAIL.'(:any)']	= 'news/detail/$1';

define('NEWS_CATEGORY','tin-tuc-khuyen-mai/danh-muc/');
$route[NEWS_CATEGORY.'(:any)']	= 'news/$1';

define('NEWS','tin-tuc');
$route[NEWS]	= 'news/index';

define('NEWS_TAGS','tin-tuc/tags/');
$route[NEWS_TAGS.'(:any)']	= 'news/tags/$1';

$route[NEWS.'/(:any)']	= 'news/index/$1';

define('BLOGS_DETAIL','blog/chi-tiet/');
$route[BLOGS_DETAIL.'(:any)']	= 'blog/detail/$1';

define('BLOGS_TAGS','blog/tags/');
$route[BLOGS_TAGS.'(:any)']	= 'blog/tags/$1';


define('BLOGS_CATEGORY','blog/danh-muc/');
$route[BLOGS_CATEGORY.'(:any)']	= 'blog/$1';
define('BLOGS','blog');
$route[BLOGS]	= 'blog/index';
$route[BLOGS.'/(:any)']	= 'blog/index/$1';

define('REGISTER','dang-ky');
$route[REGISTER]	= 'secure/my_acount';
define('MY_ACOUNT','tai-khoan');
$route[MY_ACOUNT]	= 'secure/my_account';
$route[REGISTER]	= 'secure/register';
define('LOGIN','dang-nhap');
$route[LOGIN]	= 'secure/login';

define('FORGOT_PASSWORD','quen-mat-khau');
$route[FORGOT_PASSWORD]	= 'secure/forgot_password';

define('LINK_FOR_PROCESS_AGENCY','cac-buoc-dang-ky-lam-dai-ly');
$route[LINK_FOR_PROCESS_AGENCY] = "secure/process_agency";

define('LINK_FOR_AGENCY','dang-ky-lam-dai-ly');
$route[LINK_FOR_AGENCY] = "secure/regist_agency";

$route["phi-van-chuyen"] = "cart/get_price_shipping";


define('LINK_RULE_USE','quy-dinh-su-dung');
define('LINK_FOR_NEW_USERS','danh-cho-thanh-vien-moi');
define('LINK_SALE_BUY','khuyen-mai-mua-hang');
define('LINK_USER_POLICY','chinh-sach-thanh-vien');
define('LINK_INTRO','gioi-thieu');
define('LINK_CUSTOMER_SUPPORT','ho-tro-khach-hang');
